﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo07
{
    class Program
    {
        static void Main(string[] args)
        {

                Tiger t = new Tiger();
                t.leg = 4;
                t.Walk();
                t.Eat();
                t.Sleep();
                t.Cry();
                t.behavior();

                Console.WriteLine();

                Cat c = new Cat();
                c.leg = 4;
                c.Walk();
                c.Eat();
                c.Sleep();
                c.Cry();
                c.behavior();
                c.catchMouse();

                Console.WriteLine();

                Eagle e = new Eagle();
                e.leg = 2;
                e.Walk();
                e.Eat();
                e.Sleep();
                e.Cry();
                e.behavior();

                Console.WriteLine();

                Swallow s = new Swallow();
                s.leg = 2;
                s.Walk();
                s.Eat();
                s.Sleep();
                s.Cry();
                s.behavior();
                s.FlyToSouth();

            Shape sh = new Shape();
            mj(sh);

            yunsuan();


        }
        public static void yunsuan() {
            //编写一个控制台应用程序，接受用户输入的两个整数和一个操作符，以实现对两个整数的加、减、乘、除运算，并显示出计算结果。
            Console.WriteLine("请输入两个数:");
            int a = int.Parse(Console.ReadLine());
            int b = int.Parse(Console.ReadLine());
            Console.WriteLine("请选择操作符:+，-，x,/");
            string d = Console.ReadLine();

            switch (d)
            {
                case "+":

                    Add a1 = new Add();
                    a1.DisplayResult();

                    break;


                case "-":

                    Minus m = new Minus();
                    m.DisplayResult();

                    break;

                case "*":

                    Multiply mu = new Multiply();
                    mu.DisplayResult();

                    break;

                case "/":

                    Divide di = new Divide();
                    di.DisplayResult();

                    break;


                default:
                    Console.WriteLine("没有这个选项！！");
                    break;
            }
        }
        public static void mj(Shape sh) {
            sh.GetArea();
        }
    }
}
